package com.ruoyi.facilities.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.facilities.mapper.TfGasgcMapper;
import com.ruoyi.facilities.domain.TfGasgc;
import com.ruoyi.facilities.service.ITfGasgcService;

/**
 * 废气治理设施Service业务层处理
 * 
 * @author yxf
 * @date 2021-08-10
 */
@Service
public class TfGasgcServiceImpl implements ITfGasgcService 
{
    @Autowired
    private TfGasgcMapper tfGasgcMapper;

    /**
     * 查询废气治理设施
     * 
     * @param etfId 废气治理设施ID
     * @return 废气治理设施
     */
    @Override
    public TfGasgc selectTfGasgcById(Long etfId)
    {
        return tfGasgcMapper.selectTfGasgcById(etfId);
    }

    /**
     * 查询废气治理设施列表
     * 
     * @param tfGasgc 废气治理设施
     * @return 废气治理设施
     */
    @Override
    public List<TfGasgc> selectTfGasgcList(TfGasgc tfGasgc)
    {
        return tfGasgcMapper.selectTfGasgcList(tfGasgc);
    }

    /**
     * 新增废气治理设施
     * 
     * @param tfGasgc 废气治理设施
     * @return 结果
     */
    @Override
    public int insertTfGasgc(TfGasgc tfGasgc)
    {
        tfGasgc.setCreateTime(DateUtils.getNowDate());
        return tfGasgcMapper.insertTfGasgc(tfGasgc);
    }

    /**
     * 修改废气治理设施
     * 
     * @param tfGasgc 废气治理设施
     * @return 结果
     */
    @Override
    public int updateTfGasgc(TfGasgc tfGasgc)
    {
        tfGasgc.setUpdateTime(DateUtils.getNowDate());
        return tfGasgcMapper.updateTfGasgc(tfGasgc);
    }

    /**
     * 批量删除废气治理设施
     * 
     * @param etfIds 需要删除的废气治理设施ID
     * @return 结果
     */
    @Override
    public int deleteTfGasgcByIds(Long[] etfIds)
    {
        return tfGasgcMapper.deleteTfGasgcByIds(etfIds);
    }

    /**
     * 删除废气治理设施信息
     * 
     * @param etfId 废气治理设施ID
     * @return 结果
     */
    @Override
    public int deleteTfGasgcById(Long etfId)
    {
        return tfGasgcMapper.deleteTfGasgcById(etfId);
    }
}
